package com.api.response;




import io.reactivex.functions.Predicate;

public class BaseResponsePredicate implements Predicate<BaseResponse> {


    @Override
    public boolean test(BaseResponse o) throws Exception {
        if (o.getCode().equals("1")) {
            return true;
        } else {

            throw new ResponseException(o.getMessage(), 0);


        }
    }
}
